package com.lins.store.aop;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author linshuo
 * @Date 2023/2/13 11:03
 */

@RestController
@RequestMapping("aop")
public class AopTest {

    @RequestMapping("/hello/{name}")
    @MyAnnotation(methodName = "hello") //会被aop拦截并执行
    public void hello(@PathVariable String name){
        System.out.println("hello!"+name);
    }

}
